package com.arcadia.d2.hero_attributes;

public class Attribute {

	private int strength;
	private int agility;
	private int intelligence;
	private double strengthGrowth;
	private double agilityGrowth;
	private double intelligenceGrowth;
	private int iStrengthFromItem;
	private int iAgilityFromItem;
	private int iIntelligenceFromItem;

	public Attribute(int strength, int agility, int intelligence, double strengthGrowth, 
					 double agilityGrowth, double intelligenceGrowth){
		this.strength = strength;
		this.agility = agility;
		this.intelligence = intelligence; 
		this.strengthGrowth = strengthGrowth;
		this.agilityGrowth = agilityGrowth;
		this.intelligenceGrowth = intelligenceGrowth;
		this.iStrengthFromItem = 0;
		this.iAgilityFromItem = 0;
		this.iIntelligenceFromItem = 0;
	}
	
	public Attribute(int iStrengthFromItem, int iAgilityFromItem, int iIntelligenceFromItem){
		this.iStrengthFromItem = iStrengthFromItem;
		this.iAgilityFromItem = iAgilityFromItem;
		this.iIntelligenceFromItem = iIntelligenceFromItem;
	}
	
	//Accessors
	public int getStrength() {
		return strength;
	}

	public int getAgility() {
		return agility;
	}

	public int getIntelligence() {
		return intelligence;
	}

	public double getStrengthGrowth() {
		return strengthGrowth;
	}

	public double getAgilityGrowth() {
		return agilityGrowth;
	}

	public double getIntelligenceGrowth() {
		return intelligenceGrowth;
	}
	
	public int getIStrengthFromItem() {
		return iStrengthFromItem;
	}

	public int getIAgilityFromItem() {
		return iAgilityFromItem;
	}

	public int getIIntelligenceFromItem() {
		return iIntelligenceFromItem;
	}

	public int getIStrength(int lv) {
		return (int)(lv * this.getStrengthGrowth()) + this.getIStrengthFromItem();
	}

	public int getIAgility(int lv) {
		return (int)(lv * this.getAgilityGrowth()) + this.getIAgilityFromItem();
	}

	public int getIIntelligence(int lv) {
		return (int)(lv * this.getIntelligenceGrowth()) + this.getIIntelligenceFromItem();
	}

	//Mutators
	public void setStrength(int strength) {
		this.strength = strength;
	}

	public void setAgility(int agility) {
		this.agility = agility;
	}

	public void setIntelligence(int intelligence) {
		this.intelligence = intelligence;
	}

	public void setStrengthGrowth(double strengthGrowth) {
		this.strengthGrowth = strengthGrowth;
	}

	public void setAgilityGrowth(double agilityGrowth) {
		this.agilityGrowth = agilityGrowth;
	}

	public void setIntelligenceGrowth(double intelligenceGrowth) {
		this.intelligenceGrowth = intelligenceGrowth;
	}

	public void setIStrengthFromItem(int iStrengthFromItem) {
		this.iStrengthFromItem += iStrengthFromItem;
	}

	public void setIAgilityFromItem(int iAgilityFromItem) {
		this.iAgilityFromItem += iAgilityFromItem;
	}

	public void setIIntelligenceFromItem(int iIntelligenceFromItem) {
		this.iIntelligenceFromItem += iIntelligenceFromItem;
	}

}
